const joi = require('@hapi/joi')

// 分别定义 标题、分类Id、内容、发布状态的校验规则

const title = joi.string().required()
const author = joi.string()
const type = joi.string().required()
const content = joi.string().required().allow('')

// 验证规则对象 - 发布文章
exports.add_article_schema = {
  body: {
    title,
    author,
    content,
    type
  },
}
